/*
 * @Author: A_zzzZ 
 * @Date: 2020-11-19 14:48:31 
 * @Last Modified by: A_zzzZ
 * @Last Modified time: 2020-11-19 16:35:01
 */

 import {useState} from 'react';
 import {TopicData} from '@/api/topic';
 import {IConfig} from '@/utils/types';
 export default function topicModel(){
   let [isList , updateList]  = useState([]);
   
   async function setList(obj?:IConfig){
     let data = await TopicData({page:1,size:20})
     updateList(data.data.data)
   }

   return {
     isList,
     setList
   }
 }